feat(studio): animate flat inspector group expand/collapse#2136
feat(studio): animate flat inspector group expand/collapse#2136vanceingalls wants to merge 2 commits into
Conversation
miga-heygen
left a comment
There was a problem hiding this comment.
Reviewed as part of the 15-PR edit-panel redesign stack. Full stack review posted on #2120. No blockers on this PR. — Miga
Adds a fast (120ms) CSS entrance animation for flat inspector accordion group headers/body, gated to the group actually toggling (not derived from remounting alone) to avoid a Chromium reflow quirk that otherwise replays the animation on untouched collapsed siblings.
miguel-heygen
left a comment
There was a problem hiding this comment.
Final current-head pass: 030243d. Reviewed the stack boundaries and current diff against the flat-inspector contracts; required checks have no failures/pending checks and no unresolved review threads remain. No new drift found; residual notes are non-blocking.
030243d to
fca1d7d
Compare
1fea656 to
94a812a
Compare
miguel-heygen
left a comment
There was a problem hiding this comment.
Superseding earlier approval: the latest max-review pass found confirmed correctness issues in this flat-inspector stack (identity/selector-index state, hide-all write races, timing inference, slider pointer/keyboard/reset semantics, and duplicate React keys). Hold merge and require fixes plus re-review on the current stack head.

What
Eleventh PR in the flat inspector stack (see #2120 for the foundation and full stack list). Adds a fast (~120ms) entrance animation when accordion group headers expand/collapse, matching this codebase's existing plain-CSS
@keyframes-based animation convention (no new library added).Stack: #2120 → ... → #2135 → #2136 (this).
Why
Requested directly — toggling groups was instant with no transition. Since collapsed/open headers are two different JSX branches (React mounts a fresh node on every toggle rather than morphing one persistent element), an entrance animation on whichever branch just mounted was the correct, minimal approach rather than restructuring the DOM for a true height-morph.
How
@keyframes hf-flat-group-in+.hf-flat-group-enterclass instudio.css, mirroring the existinghf-toast-inpattern (opacity + small translateY,prefers-reduced-motionoverride).PropertyPanelFlat.tsxtracksjustToggledIds: string[]— populated with both the clicked group's id and whichever group was implicitly closed by the click (deduped when they're the same), cleared ~200ms after each toggle — so only the two groups actually transitioning ever animate, not unrelated siblings.justToggledIdsrather than relying on incidental remounts.Test plan
false.oxlint/oxfmt/fallowclean.